﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using ALinq.BBS.App_GlobalResources;


namespace ALinq.BBS.Models
{
    public class RegisterModel
    {
        [DataType(DataType.Password)]
        [Required]
        [Compare("Password")]
        [Display(Name = "ConfirmPassword", ResourceType = typeof(ALinq.BBS.App_GlobalResources.Label))]
        public string ConfirmPassword
        {
            get;
            set;
        }

        [Remote("ValidateUserName", "Home", ErrorMessageResourceName = "UserNameRegistered",
                ErrorMessageResourceType = typeof(Messages))]
        [Required(AllowEmptyStrings = false)]
        [Display(Name = "UserName", ResourceType = typeof(Label))]
        public string UserName
        {
            get;
            set;
        }

        [Remote("ValidateEmail", "Home", ErrorMessageResourceName = "EmailDuplicate",
                ErrorMessageResourceType = typeof(Messages))]
        [Required(AllowEmptyStrings = false)]
        [Display(Name = "Email", ResourceType = typeof(Label))]
        public string Email
        {
            get;
            set;
        }

        [Required(AllowEmptyStrings = false)]
        [Display(Name = "Password", ResourceType = typeof(Label))]
        public string Password
        {
            get;
            set;
        }
        
        //[RequiredAttribute(AllowEmptyStrings = false)]
        [DisplayAttribute(Name = "PasswordAnswer", ResourceType = typeof(Label))]
        public string PasswordAnswer
        {
            get;
            set;
        }

        //[RequiredAttribute(AllowEmptyStrings = false)]
        [DisplayAttribute(ResourceType = typeof(Label), Name = "PasswordQuerstion")]
        public string PasswordQuestion
        {
            get;
            set;
        }
    }
}